home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Spinning Cursor 1.1 / Spinning Cursor Library Source / Test Application ƒ / Main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-26  |  825 b   |  70 lines  |  [TEXT/SPM ]

  1. /*
  2.     Main.c
  3.     
  4.     Entry point for the application.
  5.     
  6. */
  7.  
  8. #include "Main.h"
  9. #include "SpinLib.h"
  10.  
  11. /*
  12.     InitToolbox
  13.     
  14.     Initializes the Mac's toolbox.
  15. */
  16. void InitToolbox(){
  17.     
  18.     InitGraf((Ptr) &qd.thePort);
  19.     InitFonts();
  20.     InitWindows();
  21.     InitMenus();
  22.     FlushEvents(everyEvent,0);
  23.     TEInit();
  24.     InitDialogs(0L);
  25.     InitCursor();
  26. }
  27.  
  28. /*
  29.     main
  30.     
  31.     Main entry point for the application.
  32. */
  33. void main(){
  34.     short i;
  35.     long lt;
  36.     
  37.     InitToolbox();
  38.     
  39.     if (SpinInit())
  40.         SysBeep(10);
  41.     
  42.     if (SpinStart(1))
  43.         SysBeep(10);
  44.  
  45.     FlushEvents(everyEvent,0);
  46.     while(!Button())
  47.         /* Do Nothing */;
  48.  
  49.     if (SpinStop())
  50.         for (i=0;i<3;i++)
  51.         SysBeep(10);
  52.     
  53.     Delay(180,<);
  54.     
  55.     if (SpinStart(-1)){
  56.         SysBeep(10);
  57.         SysBeep(10);
  58.     }
  59.  
  60.     FlushEvents(everyEvent,0);
  61.     while(!Button())
  62.         /* Do Nothing */;
  63.  
  64.     if (SpinStop())
  65.         SysBeep(10);
  66.     
  67.     if (SpinCleanup())
  68.         SysBeep(10);
  69. }
  70.